<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <body>
        <ui:composition>
            <h:form id="suggestionsForm">
                <p:dialog position="top" modal="true" header="#{messages.Contact}" draggable="false" resizable="false" id="suggestionsDialog" widgetVar="suggestionsDialog" closable="true"> 
                    <p:inputText id="name" required="true" value="#{suggestionsBean.name}"  requiredMessage="#{messages.NameRequired}" label="#{messages.Name}">  
                        <p:ajax event="change" />
                    </p:inputText>
                    <p:watermark for="name" value="#{messages.Name}" /> 
                    <p:inputText id="email" required="true" value="#{suggestionsBean.email}"  requiredMessage="#{messages.EmailRequired}" label="#{messages.Email}">
                        <p:ajax event="change"/>
                    </p:inputText>
                    <p:watermark for="email" value="#{messages.Email}" /> 
                    <p:inputTextarea autoResize="false" required="true" styleClass="ui-inputtext summaryTextArea" counterTemplate="{0} #{messages.CharactersRemaining}" id="suggestionContent" value="#{suggestionsBean.content}" requiredMessage="#{messages.MessageRequired}" maxlength="1024" counter="counter">
                        <p:ajax event="change"/>
                    </p:inputTextarea>
                    <p:watermark for="suggestionContent" value="#{messages.Message}" /> 
                    <h:outputText styleClass="bodyText block" id="counter" />
                    <p:commandButton style="margin-top:1em;" styleClass="grayBackgroundStrong" id="sendEmail" value="#{messages.Send}" oncomplete="suggestionsDialog.hide()" actionListener="#{suggestionsBean.createNewSuggestion()}"/>
                </p:dialog>
            </h:form>
        </ui:composition>
    </body>
</html>

